<%@ Page Language="c#" Inherits="PHSRAG.Insight21.ClinicalTrials.BudgetSummaryPage"
    CodeFile="BudgetSummary.aspx.cs" %>

<%@ Register TagPrefix="cc1" Namespace="PHSRAG.Insight21.InsightWebControls" Assembly="PHSRAG.Insight21.InsightWebControls" %>
<%@ Register TagPrefix="cc2" Namespace="PHSRAG.WebControls" Assembly="PHSRAG.WebControls" %>
<%@ Register TagPrefix="cc3" TagName="BudgetBuilderOverviewControl" Src="Controls/BudgetBuilderOverviewControl.ascx" %>
<%@ Register TagPrefix="cc3" TagName="BudgetTabs" Src="Controls/BudgetTabs.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Budget Setup</title>
    <link href="../Insight21.css" type="text/css" rel="stylesheet" />

    <script type="text/javascript">
      var statusIndex = 0;
      function OnStatusChanged( control )
      {
         if ( control.options[control.selectedIndex].value == "ClinicalTrialBudgetStatusFinal" )
         {
            if ( !confirm( 'Are you sure you want to Finalize this budget?  No further changes will be allowed unless the budget is set to Amended.' ) )
            {
               control.selectedIndex = statusIndex;
            }
         }
         statusIndex = document.all.budgetStatus.selectedIndex;            
      }
    </script>

    <script for="window" event="onload" language="JScript">
         statusIndex = document.all.budgetStatus.selectedIndex;
    </script>

</head>
<body>
    <form id="BudgetSetupForm" method="post" runat="server">
        <table class="Container">
            <tr>
                <td>
                    <table cellspacing="0" width="100%">
                        <tr>
                            <td>
                                <cc1:Header ID="header" runat="server"></cc1:Header>
                            </td>
                        </tr>
                    </table>
                    <table cellspacing="0" width="100%">
                        <tr>
                            <td>
                                <cc1:ClinicalTrialsSubNavigation ID="clinicaltrialsSubNavigation" runat="server"></cc1:ClinicalTrialsSubNavigation>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <cc2:BreadCrumb ID="breadCrumb" runat="server"></cc2:BreadCrumb>
                            </td>
                            <td align="right">
                            </td>
                        </tr>
                    </table>
                    <table width="100%">
                        <tr>
                            <td>
                                <cc3:BudgetBuilderOverviewControl ID="budgetBuilderOverview" runat="server"></cc3:BudgetBuilderOverviewControl>
                            </td>
                        </tr>
                    </table>
                    <cc3:BudgetTabs ID="budgetTabs" runat="server" />
                    <table width="100%" cellspacing="10">
                        <tr>
                            <td>
                                <cc2:ActivityIndicator ID="activityIndicator" runat="server"></cc2:ActivityIndicator>
                            </td>
                        </tr>
                    </table>
                    <table>
                        <tr>
                            <td>
                                <cc2:Annunciator ID="annunciator" runat="server"></cc2:Annunciator>
                            </td>
                        </tr>
                    </table>
                    <asp:Label ID="message" runat="server" Visible="False">message</asp:Label>
                    <table width="60%" class="ClinicalTrialsData">
                        <tr>
                            <td>
                                Study Summary for
                                <asp:TextBox ID="numberOfPatients" Width="5%" CssClass="DataInput" runat="server" />
                                Patient(s) &nbsp;&nbsp;&nbsp;&nbsp; Status
                                <asp:DropDownList ID="budgetStatus" Width="40%" CssClass="DataInput" runat="server" />
                                <asp:Button ID="save" Width="10%" CssClass="Button" runat="server" Text="Save" OnClick="OnSave" />
                            </td>
                        </tr>
                    </table>
                    <br />
                    <table style="width:70%; height: 5px; background-color:#5a76a0; color:White; font-weight:bold">
                        <tr>
                            <td>
                                Budget Summary
                            </td>
                            <td>
                                <cc1:InsightDownloadBar ID="reportDownload" runat="server" Height="4px"
                                    BackColor="#5A76A0" useRootHost="true" />
                            </td>
                        </tr>
                    </table>
                    <table width="70%" class="DataGrid">
                        <tr class="DataGridHeader">
                            <td style="width:30%">
                                Line Item Summary</td>
                            <td style="width: 20%; text-align: right">
                                Total Per<br />
                                Subject</td>
                            <td style="width: 16%; text-align: right">
                                Total Per<br />
                                subject w/<br />
                                overhead</td>
                            <td style="width: 16%; text-align: right">
                                Total</td>
                            <td style="width: 17%; text-align: right">
                                Total with<br />
                                overhead</td>
                        </tr>
                        <asp:PlaceHolder ID="tasksRows" runat="server" />
                    </table>
                    <table width="100%">
                        <tr>
                            <td>
                                <asp:Button ID="close" Width="10%" CssClass="Button" runat="server" Text="Close" />
                                <input type="button" id="ViewStudyMargin" onclick="window.open( 'BudgetMargin.aspx', 'Margin', 'width=600,height=400,scrollbars=no,resizable=yes,status=no' );"
                                    class="Button" value="View Study Margin" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
